package commons

import (
	"github.com/astaxie/beego/cache"
	"github.com/astaxie/beego/logs"
)

var Cache cache.Cache

func init()  {
	bm, err := cache.NewCache("file", `{"CachePath":"./cache","FileSuffix":".cache","DirectoryLevel":"2","EmbedExpiry":"120"}`)
	if err != nil {
		logs.Error(err)
	} else {
		logs.Info("redis cache contect ...")
		Cache = bm
	}
}